<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
</head>
<body>
<div id="app">
<!--    v-model的实现：手动实现v-model的双向数据绑定-->
    <input type="text" :value="msg" @input="msg=$event.target.value">
    <input type="text" v-model="msg">
    <p>{{msg}}</p>
</div>
<script>
    const vm = new Vue({
        el: '#app',
        data() {
            return {
                msg:''
            }
        }
    })
</script>
</body>
</html>